<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			var a = prompt("1.登录2.退出");
			switch (a) {
				case "1":
					do {
						var name = prompt("请输入用户名");
						var password = prompt("请输入密码");
						if (name === "tom" && password === "123") {
							alert("欢迎使用学掌门");
							break;
						}
					} while (true);
					break;
				case "2":
					break;
			}
		</script>
	</head>
	<body>
	</body>
</html>
